package com.sf.dlb.jpa.repository;

import com.sf.dlb.jpa.model.WalletAddressInfo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 用户地址表 Repository
 *
 * Created by jing.tan on 2018/5/21.
 */
@Repository
public interface WalletAddressRepository extends JpaRepository<WalletAddressInfo, Long> {
    /**
     * 根据用户ID-查询
     * @param userId
     * @param DelFlag
     * @return
     */
    List<WalletAddressInfo> findByUserIdAndDelFlag(String userId, String DelFlag);
    /**
     * 根据地址名称-查询
     * @param address
     * @param DelFlag
     * @return
     */
    WalletAddressInfo findByAddressAndDelFlag(String address, String DelFlag);

}